package cointerface;

import java.util.Scanner;

public class UseCompute {
	public static void useCom(Icompute com, int one, int two) {
		com.calc(one, two);
	}

	public static void main(String[] args) {
		System.out.print("请输入第一个数字：");
		Scanner input = new Scanner(System.in);
		int num1 = input.nextInt();
		System.out.print("请输入第2个数字：");
		int num2 = input.nextInt();
		useCom(new Add(), num1, num2);
		useCom(new Subtraction(), num1, num2);
		useCom(new Product(), num1, num2);
		useCom(new Divide(), num1, num2);
	}
}
